import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';

//模型活动任务组关系管理单条查询
export const queryBizModelActivityTaskGroup = (params) => {
  params.head.transCode = 'queryBizModelActivityTaskGroup';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/queryBizModelActivityTaskGroup',
    method: 'post',
    data: params
  })
}
//模型活动任务组关系管理多条列表查询，支持条件查询
export const queryBizModelActivityTaskGroupListPage = (params) => {
  params.head.transCode = 'queryBizModelActivityTaskGroupListPage';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/queryBizModelActivityTaskGroupListPage',
    method: 'post',
    data: params
  })
}
//模型活动任务组关系管理新增单条记录
export const saveBizModelActivityTaskGroup = (params) => {
  params.head.transCode = 'saveBizModelActivityTaskGroup';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/saveBizModelActivityTaskGroup',
    method: 'post',
    data: params
  })
}
//模型活动任务组关系管理新增多条记录
export const saveBizModelActivityTaskGroupList = (params) => {
  params.head.transCode = 'saveBizModelActivityTaskGroupList';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/saveBizModelActivityTaskGroupList',
    method: 'post',
    data: params
  })
}
//模型活动任务组关系管理新增或修改单条记录
export const saveOrUpdateBizModelActivityTaskGroup = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelActivityTaskGroup';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/saveOrUpdateBizModelActivityTaskGroup',
    method: 'post',
    data: params
  })
}


//模型活动任务组关系管理新增或修改单条记录
export const saveOrUpdateBizModelActivityTaskGroupList = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelActivityTaskGroupList';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/saveOrUpdateBizModelActivityTaskGroupList',
    method: 'post',
    data: params
  })
}

//模型活动任务组关系管理修改单条记录
export const updateBizModelActivityTaskGroup = (params) => {
  params.head.transCode = 'updateBizModelActivityTaskGroup';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/updateBizModelActivityTaskGroup',
    method: 'post',
    data: params
  })
}

//模型活动任务组关系管理删除单条记录
export const deleteBizModelActivityTaskGroup = (params) => {
  params.head.transCode = 'deleteBizModelActivityTaskGroup';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/deleteBizModelActivityTaskGroup',
    method: 'post',
    data: params
  })
}

//模型活动任务组关系管理删除多条记录
export const deleteBizModelActivityTaskGroupList = (params) => {
  params.head.transCode = 'deleteBizModelActivityTaskGroupList';
  return request({
    url: '/biz/model/bizModelActivityTaskGroup/deleteBizModelActivityTaskGroupList',
    method: 'post',
    data: params
  })
}
//模型活动任务组关系管理导出excel
export const exportBizModelActivityTaskGroupExcel = (params) => {
  downloadExcel({
    url: '/biz/model/bizModelActivityTaskGroup/excelDownload/exportBizModelActivityTaskGroupExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
